package com.ybu.common;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.DigestUtils;
import java.nio.charset.StandardCharsets;

public class MD5Utils {
    public static String enctype(String password,String salt,int time) {
        password = password + salt;
        for (int i = 0; i < time; i++) {
            password = DigestUtils.md5DigestAsHex(password.getBytes(StandardCharsets.UTF_8));
        }
        return password;
    }
    }
